package com.sunkyc.controller.auth;

import com.sunkyc.commons.entity.R;
import com.sunkyc.commons.entity.Captcha;
import com.sunkyc.framework.system.service.CaptchaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "验证码前端控制器")
@RequestMapping("/captcha")
@RequiredArgsConstructor
public class CaptchaController {
    private final CaptchaService captchaService;
    /**
     * 获取随机验证码
     */

    @ApiOperation("获取系统生成的随机验证码")
    @GetMapping("/webCaptcha")
    public R<Captcha> getCaptcha(){
        Captcha captcha = captchaService.create();
        return R.ok(captcha);
    }





    /**
     * 手机发送验证码
     */

}
